#pragma once
#include <map>
#include <string>
#include <fstream>

class Entity;
class Map;
class Scene
{
public:
	typedef std::map< int, Entity *> EntityMap;
	Scene();
	~Scene();

	void Render( int layer = -1 );
	void Update();
	Entity *GetEntity( int id );
	void RemoveEntity( int id );
    void AddEntity( Entity *e );

	void SaveEditor( std::ofstream &f );
	void LoadEditor( std::ifstream &f );

	EntityMap mObjs;
	EntityMap mUpdateObjs;
	int mX;
	int mY;

	int mTop;
	int mLeft;
	int mWidth;
	int mHeight;
	Map *mMap;
};